﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

using Warehouse.Common.Entities;
using Warehouse.BusinessLogic;

namespace Warehouse.UI.WinForm.Forms
{
    public partial class UserEditForm : Warehouse.UI.WinForm.Forms.EditForm
    {
        public UserEditForm()
        {
            InitializeComponent();
        }

        protected override bool GetByID(int id)
        {
            var bl = UserBL.Instance;
            bs.DataSource = bl.GetByID(id);

            var book = (bs.Current as User);

            return bs.DataSource != null;
        }

        protected override bool StartAdd()
        {
            var bl = UserBL.Instance;
            bs.DataSource = bl.Create();

            return bs.DataSource != null;
        }
    }
}
